-- GENERATED SPELL FOR [Plagued Fiend] --


function spell0_31150(pUnit, Event) --@Disease Cloud,Self--
pUnit:FullCastSpellOnTarget(50106,pUnit)
pUnit:RegisterEvent('Sorts_31150', 0, 1)
end

function spell1_31150(pUnit, Event) --@Plague Bite,n/a--
pUnit:FullCastSpellOnTarget(60678,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31150', 8000, 1)
end

function Sorts_31150(pUnit, Event)
local choix_sorts_31150 = math.random(0, 1)
if choix_sorts_31150 == 0 then
pUnit:RegisterEvent('spell0_31150', 1, 1)
end
if choix_sorts_31150 == 1 then
pUnit:RegisterEvent('spell1_31150', 1, 1)
end
end

function mob31150_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31150', math.random(1500, 3000), 1)
end

function mob31150_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31150_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31150_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31150, 1, 'mob31150_Action')
RegisterUnitEvent(31150, 2, 'mob31150_Leave')
RegisterUnitEvent(31150, 3, 'mob31150_Kill')
RegisterUnitEvent(31150, 4, 'mob31150_Die')
